<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="../skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script> 

<link href="misc/modal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="misc/jqModal.js"></script>


</head>
<body>

{template 'header.html'}

<div class="container">


  <div class="main">
  	
    <div class="mod">

        <div class="body">
            
            <form action="{url("?module=$module&action=register")}" method="post" name="registerform" id="registerform">
            
            <legend>新用户注册</legend>
           <table width="93%" cellpadding="3" cellspacing="0" class="">
              {if $modelid && $M['choosemodel'] && $member->count_model() >= 2}
<tr>
                <th width="20%" align="right">所在模型</th>
                <td width="80%" align="left">{$MODEL[$modelid][name]}</td>
             </tr>
              {/if}
              <tr>
                <th align="right">Email地址</th>
                <td align="left"><input name="memberinfo[email]" type="text"  style="ime-mode:disabled" require="true" datatype="email|ajax" url="{url("?module=$module&action=checkemail")}" msg="邮件格式不正确|" id="email" size="30" />
                </td>
              </tr>
              <tr>
                <th align="right">密码</th>
                <td align="left"><input name="memberinfo[password]" require="true" datatype="limit" min="6" max="16" msg="密码不得少于6个字符或超过16个字符！"  type="password" id="reg_password" size="20" maxlength="16" /></td>
             </tr>
             <tr>
                <th width="20%" align="right">昵称</th>
                <td width="80%" align="left"><input type="text" name="memberinfo[nickname]" value="" size="20" maxlength="20"  require="true" datatype="limit" min="3" max="20" msg="昵称不得少于3个字符超过20个字符|" /></td>
             </tr>
              <tr>
              <th align="right">所在地区</th>
              <td>
                <input type="hidden" name="memberinfo[areaid]" id="areaid" value="{$areaid}">
                <span id="load_areaid"></span>
                <a href="javascript:areaid_reload();">&nbsp;重选&nbsp;</a>
                </td>
            </tr>
              <tr>
                <th align="right">验证码</th>
                <td align="left">
                
                <!--<input name="checkcodestr" type="text" style="ime-mode:disabled" require="true" datatype="limit" min="4" max="4" msgid="code" msg="验证码必须填写" size="6" />
                  &nbsp;<img src="misc/checkcode/checkcode.php" id="checkcode" onClick="this.src='misc/checkcode/checkcode.php?id='+Math.random()*5;" style="cursor:pointer;" alt="验证码,看不清楚?请点击刷新验证码" align="absmiddle" class="color_1" />&nbsp;<span class="color_1"></span><span id="code"></span>-->
                  
                  {form::checkcode('checkcodestr', 6)}
                  
                  
                </td>
              </tr> 
              <tr>
                <th align="right"></th>
                <td align="left"> <input type="checkbox" name="regagreement" id="regagreement" checked="checked" value="1" datatype="group" min="1" max="1" require="true" msg="请选择是否同意网站协议" msgid="reg" /><label for="regagreement"><a href="{url("?module=member&action=regagreement")}" target="_blank">阅读并同意《{$SETTING[sitename]}网络服务使用协议》</a></label>
                <span id="reg"></span>
                </td>
              </tr>
              <tr>
              <th align="right"></th>
              <td align="left">
                    <input type="submit" name="dosubmit" id="registerform" class="button button-primary" value="注册" />
                    <input type="reset" name="reset" class="button" value="重置" />		
                    <input type="hidden" name="memberinfo[modelid]" value="{if $modelid}{$modelid}{else}10{/if}"  />
                    <input name="action" type="hidden" value="register" />
                </td>
              </tr>
            </table>
        </form> 
        </div>
    </div> 
    
  </div>
  
  <div class="aside">
  		
    <div class="mod">
            <div class="body">
            	<br/>
            	<br/>
            	<br/>
                已经拥有账号? <a href="{url("?module=member&action=login")}">直接登录</a>
            </div>
        </div>
  </div>
</div>

{template 'footer.html'}
<script language="javascript" type="text/javascript">

// area
function areaid_load(id)
{
	$.get("?module=area&action=load", { field: 'areaid', id: id },
		function(data){
			$('#load_areaid').append(data);
			  });
}
function areaid_reload()
{
	$('#load_areaid').html('');
		areaid_load(0);
}
areaid_reload();


$().ready(function() {
	  $('form').checkForm(1);
});

</script> 